
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style type="text/css">

</style>
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="upload.js"></script>
<body>
<h3>可将图片拖拽到下框中</h3>
<div id="drop_area"></div>


</body>
<script type="text/javascript">
    var dragImgUpload = new DragImgUpload("#drop_area",{
        callback:function (files) {
            //回调函数，可以传递给后台等等
            var file = files[0];
            console.log(file.name);
        }
    })
</script>
</html>